interface _CS_ {
    /**
     * 字符串前补充指定字符
     * @param str 字符串
     * @param maxLength <0> 字符串最终长度
     * @param fillString <' '> 指定字符
     * @returns 字符串
     */
    fillStart(str: string, maxLength?: number, fillString?: string): string;
}
{
    Object.defineProperty(_CS_.prototype, 'fillStart', {
        writable: false,
        configurable: false,
        enumerable: false,
        value: (str: string, maxLength = 0, fillString = ' ') => {
            maxLength = maxLength >> 0;
            fillString = String(fillString || ' ');
            if (str.length > maxLength) {
                return String(str);
            } else {
                maxLength -= str.length;
                if (maxLength > fillString.length) {
                    fillString += fillString.repeat(maxLength / fillString.length);
                }
                return fillString.slice(0, maxLength) + str;
            }
        }
    });
}
